package com.lude.erp.prototype.model;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;

import com.lude.erp.common.model.BaseModel;

@Entity(name = "identity_credential_type")
public class IdentityCredentialType implements BaseModel
{

	private static final long serialVersionUID = 1L;

	private long typeId;

	private String name;

	private Date createdDate;

	private Date createdDatetime;

	private Date updatedDate;

	private Date updatedDatetime;

	private Set<IdentityCredential> identityCredentials = new HashSet<IdentityCredential>(0);

	@Id
	@GeneratedValue
	public long getTypeId()
	{
		return typeId;
	}

	public void setTypeId(long typeId)
	{
		this.typeId = typeId;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public Date getCreatedDate()
	{
		return createdDate;
	}

	public void setCreatedDate(Date createdDate)
	{
		this.createdDate = createdDate;
	}

	public Date getCreatedDatetime()
	{
		return createdDatetime;
	}

	public void setCreatedDatetime(Date createdDatetime)
	{
		this.createdDatetime = createdDatetime;
	}

	public Date getUpdatedDate()
	{
		return updatedDate;
	}

	public void setUpdatedDate(Date updatedDate)
	{
		this.updatedDate = updatedDate;
	}

	public Date getUpdatedDatetime()
	{
		return updatedDatetime;
	}

	public void setUpdatedDatetime(Date updatedDatetime)
	{
		this.updatedDatetime = updatedDatetime;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "identityCredentialType")
	public Set<IdentityCredential> getIdentityCredentials()
	{
		return identityCredentials;
	}

	public void setIdentityCredentials(Set<IdentityCredential> identityCredentials)
	{
		this.identityCredentials = identityCredentials;
	}

}
